home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / Clocks / TimeZonePatch / PatchTimeZone < prev    next >
Encoding:
Text File  |  1995-06-12  |  1.5 KB  |  80 lines

  1. #!/bin/sh
  2.  
  3. # @(#) PatchTimeZone - patch Preferences.app for timezone - 1.0 12/sep/93
  4. #
  5. # Bjorn Asle Valde (valde@uib.no)
  6. # Patch by Klaus Bscheid (klaus@ideal.muc.de)
  7. #
  8. # USE AT YOUR OWN RISK
  9.  
  10. labelfile=__INFO.labels
  11. apptopatch=/NextApps/Preferences.app
  12. progtopatch=Preferences
  13. backupfile=Preferences.orig
  14. mywd=`pwd`
  15.  
  16. check_for_root()
  17. {
  18. user=`whoami`
  19.  
  20. if [ "$user" != "root" ]; then
  21.     cat <<- EOF 
  22.  
  23.     You must be root to patch preferences.
  24.  
  25.     Please login as user "root" and run
  26.     this program, or authenticate yourself
  27.     as superuser by keying in "su" in a terminal
  28.     window, supply the root password, and run
  29.     this program by typing:
  30.  
  31.     sh PatchTimeZone
  32.  
  33. EOF
  34. exit 1
  35. fi
  36. }
  37.  
  38. check_is_patched()
  39. {
  40. cd $apptopatch
  41. if [ -f $backupfile ]; then
  42.    echo 'Prefences seems to be patched, no point in doing it a second time'
  43.    exit 1
  44. fi
  45. }
  46.  
  47. patch_Preferences()
  48. {
  49. echo -n Patching Preferences... 
  50. patchfile=$mywd/$labelfile
  51. cd $apptopatch
  52. cp -p Preferences Preferences.orig
  53. segedit Preferences.orig -replace __INFO labels $patchfile -o Preferences
  54. echo done.
  55. }
  56.  
  57. #                              ***** MAIN *****
  58.  
  59. check_for_root
  60. check_is_patched
  61. patch_Preferences
  62. cat <<- EOF
  63.  
  64. Succesfully patched Preferences.app
  65.  
  66. Now start Preferences.app and select MET
  67. or CET as your time zone for Europe. If 
  68. you run the command "date" in a terminal
  69. window after having set the timezone
  70. you should get an answer looking
  71. something like this:
  72.  
  73. Sun Sep 12 15:49:44 MET DST 1993
  74.  
  75. You local date/time and timezone is now:
  76.  
  77. EOF
  78. echo `date`
  79. cd $mywd
  80. exit 0